# 默认编译所有程序
default:helloc hellocpp sqlite_test hello.class hellogo hellors
# 编译C程序
helloc:helloc.o
	gcc -o helloc helloc.o
helloc.o:hello.c
	gcc -c hello.c -o helloc.o
# 编译C++程序
hellocpp:hellocpp.o
	g++ -o hellocpp hellocpp.o
hellocpp.o:hello.cpp
	g++ -c hello.cpp -o hellocpp.o
hellors:hello.rs
	rustc -o hellors hello.rs
# 编译go程序
hellogo:hello.go
	go build -o hellogo hello.go
# 编译java程序
hello.class:hello.java
	javac hello.java
# 编译SQLITE程序
sqlite_test:sqlite_test.o
	gcc -o sqlite_test sqlite_test.o -l sqlite3
sqlite_test.o:sqlite_test.c
	gcc -c sqlite_test.c -o sqlite_test.o -l sqlite3
# 声明clean为伪目标 
.PHONY:clean
# 清除所有编译结果文件
clean:
	rm -rf *.o helloc hellocpp a.out sqlite_test test.db test.txt hello.class hellogo hellors

